package com.hyh.spring.controller;

import com.hyh.spring.domain.CommonResult;
import com.hyh.spring.domain.Order;
import com.hyh.spring.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @BelongsPackage: com.hyh.spring.controller
 * @ClassName OrderController
 * @Author: hyhWTX
 * @CreateTime: 2023-06-05  17:37
 * @Description: TODO (一句话描述以下该类的功能)
 * @Version: 1.0
 */
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;


    @GetMapping("/order/create")
    public CommonResult create(Order order)
    {
        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}

